import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/frontend/auth/login',
    method: 'post',
    data
  })
}

export function loginByUsername(data) {
  return request({
    url: '/api/frontend/auth/loginByUsername',
    method: 'post',
    data
  })
}

export function checkToken(data) {
  return request({
    url: '/api/frontend/auth/check',
    method: 'get',
    data
  })
}
export function getLoginCode(params) {
  return request({
    url: '/api/frontend/auth/sendSMSVerifycode',
    method: 'get',
    params
  })
}